package com.kylin.function;

import java.util.function.Predicate;

//boolean 断定型接口
public class Demo02 {

    public static void main(String[] args) {

        Predicate<String> predicate = new Predicate<String>() {

            @Override
            public boolean test(String s) {
               return s.isEmpty();
            }
        };

        System.out.println(predicate.test(""));

        Predicate<String> predicate1 = (str)->{return str.isEmpty();};

        System.out.println(predicate1.test("123"));
    }
}
